Skip to content

feat: bedrock-oss-provisioned-throughput-polling#5893

Open
lucasjia-aws wants to merge 3 commits into
aws:masterfrom
lucasjia-aws:bedrock-oss-provisioned-throughput-polling
Open

feat: bedrock-oss-provisioned-throughput-polling#5893
lucasjia-aws wants to merge 3 commits into
aws:masterfrom
lucasjia-aws:bedrock-oss-provisioned-throughput-polling

Conversation

@lucasjia-aws
Copy link
Copy Markdown
Collaborator

@lucasjia-aws lucasjia-aws commented May 26, 2026

Description

Add synchronous polling for Bedrock OSS (non-Nova) model deployments.

Previously, BedrockModelBuilder.deploy() for OSS models would fire off a create_model_import_job call and return immediately, leaving the user to manually wait for the import to complete. This PR adds polling so deploy() waits until the import job completes and the model is ready for on-demand inference, matching the synchronous behavior of the Nova deployment path.

CreateProvisionedModelThroughput is provided as a separate public method (create_provisioned_throughput()) for users who need dedicated throughput, rather than being mandatory in the deploy flow.

Changes

Implementation (bedrock_model_builder.py):

  • Non-Nova deploy() now waits for the import job to complete and returns the job details. Model is ready for on-demand inference after deploy() returns.
  • New public method: create_provisioned_throughput() — creates provisioned throughput for an imported model and polls until InService. This is a standalone method, not called by deploy().
  • New private methods: _wait_for_import_job_complete(), _wait_for_provisioned_throughput_in_service().

Unit tests (test_bedrock_model_builder.py):

  • Updated existing non-Nova deploy tests to verify deploy() waits for import completion and does NOT call PT APIs.
  • Added test classes: TestWaitForImportJobComplete, TestCreateProvisionedThroughput, TestWaitForProvisionedThroughputInService.

Integration test (test_bedrock_provisioned_throughput.py):

  • New integ test for import job polling (test_deploy_oss_model_waits_for_import_completion).
  • Skipped integ test for create_provisioned_throughput() — pending PT MU quota approval on CI account.

Testing

  • Unit tests cover all new methods (happy path, polling, failure, timeout) — 66 tests passing.
  • Integration test for deploy() validated locally against real Bedrock APIs — import job creation, polling to completion (~6 min), and model readiness all confirmed.
  • CreateProvisionedModelThroughput API call validated locally (passes parameter validation), blocked only by account-level service quota (0 MU limit). Integ test marked as skip until quota is granted.

@lucasjia-aws lucasjia-aws force-pushed the bedrock-oss-provisioned-throughput-polling branch from 456b788 to d6636a0 Compare June 1, 2026 06:23
… method

- deploy() for non-Nova models now waits for import job completion and returns job details. Model is ready for on-demand inference after deploy().
- Removed mandatory CreateProvisionedModelThroughput from deploy() flow.
- create_provisioned_throughput() remains as a standalone public method for users who need dedicated throughput.
- Updated unit tests to verify deploy() no longer calls PT APIs.
- Added integ test for import job polling (test_deploy_oss_model_waits_for_import_completion).
- Added skipped integ test for create_provisioned_throughput() pending PT MU quota approval.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant